<?php
/**
 * PHP-AB - The PHP A/B Testing Framework
 * 
 * @author Patrick J. Mizer
 */

/* Register PHP-AB autoloading */
require __DIR__ . '/core/ClassLoader.class.php';
spl_autoload_register('Ab\Core\ClassLoader::loadClass');

/* Create DB connection */
$dbClass =  \Ab\Config\Database::DB_CLASS;
$dbConn = new $dbClass(
        \Ab\Config\Database::DSN,
        \Ab\Config\Database::USERNAME,
        \Ab\Config\Database::PASSWORD);

/* Register DAO w/ container */
\Ab\Core\Container::$dao = new \Ab\Core\Dao($dbConn);
?>